/*
** my_strncpy.c for my_strncpy in /home/chassa_m/rendu
** 
** Made by chassa_m
** Login   <chassa_m@epitech.net>
** 
** Started on  Mon Oct  7 12:22:38 2013 chassa_m
** Last update Wed Oct  9 14:50:52 2013 chassa_m
*/

char	*my_strncpy(char *dest, char *src, int nb)
{
  int	i;
  int	count;

  count = my_strlen(src);
  i = 0;
  while (i < nb)
    {
      dest[i] = src[i];
      i = i + 1;
    }
  if (nb > count)
    {
      dest[i + 1] = '\0';
    }
  return (dest);
}
